fstats_doe_response_surface Module

Response-surface optimization.

This module locates the factor settings that maximize, minimize, or achieve a target value of a fitted doe_model response surface within a box of factor bounds. The search is performed in coded variables on the range [-1, 1], which is the scale on which the model is assumed to have been fit, using a projected gradient method with a backtracking line search that is started from multiple points to reduce the chance of stopping at a local optimum.



Functions

public function doe_optimize_rsm(mdl, x_low, x_high, goal, target, tol, max_iter) result(opt)

Optimizes a fitted response surface within a box of factor bounds.

Read more…

Arguments

Type IntentOptional Attributes Name
class(doe_model), intent(in) :: mdl

The fitted DOE model, defined in coded variables.

real(kind=real64), intent(in), dimension(:) :: x_low

The lower natural-scale bound for each factor.

real(kind=real64), intent(in), dimension(:) :: x_high

The upper natural-scale bound for each factor. This array must be the same size as x_low, and each element must exceed the corresponding element of x_low.

character(len=*), intent(in), optional :: goal

The optimization goal: max (the default), min, or target.

real(kind=real64), intent(in), optional :: target

The target response value. This is required if goal is target, and is ignored otherwise.

real(kind=real64), intent(in), optional :: tol

The convergence tolerance on the projected gradient step. The default is 1.0d-8.

integer(kind=int32), intent(in), optional :: max_iter

The maximum number of iterations allowed for each starting point. The default is 1000.

Return Value type(doe_optimization_result)

A doe_optimization_result containing the optimal factors in both coded and natural scale, the predicted response at the optimum, the iteration count and convergence flag of the best run, the method name, and the tolerance used.


Subroutines

public subroutine doe_stationary_point(mdl, n, z, nature, ok, eigenvalues)

Computes the stationary point of a quadratic (nway <= 2) response surface in coded variables and classifies its nature.

Read more…

Arguments

Type IntentOptional Attributes Name
class(doe_model), intent(in) :: mdl

The fitted DOE model, defined in coded variables. Its nway must be 1 or 2.

integer(kind=int32), intent(in) :: n

The number of factors.

real(kind=real64), intent(out), allocatable, dimension(:) :: z

The stationary point in coded variables. This is allocated only if ok is true.

character(len=:), intent(out), allocatable :: nature

One of maximum, minimum, saddle, singular, or not quadratic.

logical, intent(out) :: ok

True if a unique stationary point was found.

real(kind=real64), intent(out), optional, allocatable, dimension(:) :: eigenvalues

The eigenvalues of the Hessian, in coded variables.